<template>
    <!--管理员-->
    <div class="role">
        <a-card>
            <div class="table">
                <Tables
                    ref="table"
                    :columns="columns"
                    :loadData="findRefrigeratorList"
                    :addData="addRefrigerator"
                    :editData="editRefrigerator"
                    :delData="delRefrigerator"
                    :formColumns="formColumns"
                >
                    <template slot="status" slot-scope="{text}">
                        <span>{{ status[text] }}</span>
                    </template>
                </Tables>
            </div>
        </a-card>
    </div>
</template>

<script>
import rules from '@/validate/admin'
import { addRefrigerator, editRefrigerator, findRefrigeratorList, delRefrigerator } from '@/api/refrigerator'

export default {
    name: 'RefrigeratorList',
    data() {
        return {
            columns: [
                {
                    dataIndex: 'number',
                    title: '冰箱编号',
                    align: 'center'
                }
            ],
            formColumns: {
                number: {
                    type: 'input',
                    label: '冰箱编号'
                },
                id: {
                    type: 'hidden'
                }
            },
            rules: rules,
            findRefrigeratorList,
            addRefrigerator,
            editRefrigerator,
            delRefrigerator
        }
    },
    created() {

    },
    methods: {

    }
}
</script>

<style scoped></style>
